package com.cqut.forum.dao.imp;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.cqut.forum.dao.ModuleInformationDao;

@Component
public class ModuleInformationDaoImp extends BaseDaoImp implements ModuleInformationDao{

	public <T> boolean unDelete(int id) {
		return false;
	}
	@SuppressWarnings("unchecked")
	@Override
	public List<Map<String, Object>> loadModuleInfos() {
		/*String sql = "select u.user_name,mi.module_css,m.module_name,mi.module_information_id " +
				"from module m,module_information mi,user u where mi.module_id=m.module_id and " +
				"mi.user_id=u.user_id and mi.user_id in " +
				"(" +
				"select u.user_id from user u,role r where u.role_id=r.role_id and r.role_name=\"管理员\"" +
				")";*/
		String sql ="select mi.module_information_id,mi.information_name " +
				"from module_information mi";
		List<Map<String, Object>> result = (List<Map<String, Object>>) super.excuteSql(sql, null, null);
		return result;
	}
}
